<template>
  <div class="list">
    <div
      class="article_item"
      v-for="item in $store.state.newsList.news"
      :key="item.art_id"
    >
      <h3 class="van-ellipsis">{{ item.title }}</h3>
      <div class="img_box">
        <img
          v-for="(i, index) in item.cover.images"
          :key="index"
          :style="{ width: (1 / item.cover.images.length) * 100 + '%' }"
          :src="i"
          class="w100"
        />
      </div>
      <!---->
      <div class="info_box">
        <span>{{ item.aut_name }}</span>
        <span>{{ item.comm_count }}评论</span>
        <span>{{ item.pubdate }}</span>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  created () {
    //
    // setTimeout(() => {
    //   const currIndex = this.$store.state.navbar.currIndex
    //   const id = this.$store.state.navbar.list[currIndex].id
    //   console.log('id', id)
    // }, 5000)
  }
}
</script>
<style></style>
